# -*- coding: utf-8 -*-
"""
Created on Fri Nov 21 09:31:44 2025

@author: 1234
"""


chinese = [["张三", "S001", 85], 
           ["李四", "S002", 92],
           ["王五", "S003", 78]]


math = [["张三", "S001", 90],
        ["李四", "S002", 87],
        ["王五", "S003", 85]]


english = [["S001", "张三", 88], 
           ["S002", "李四", 85],
           ["S003", "王五", 80]]

def rearrange(scores):
    rearranged_scores = []
    
    for name,sid,score in scores:
       rearranged_scores.append([sid,name,score])
    return rearranged_scores


print("chinese:",rearrange(chinese))
print("math:",rearrange(math))
print("english:",english)